/**
 *
 */
package jp.seraph.jsade.model.nao;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import jp.seraph.jsade.model.ModelObjectIdentifier;

/**
 * Naoモデル用ModelObjectIdentifier実装です。
 *
 */
public class NaoObjectIdentifier implements ModelObjectIdentifier {
    public NaoObjectIdentifier(String aName){
        mName = aName;
        IDENTIFIER_MAP.put(aName, this);
    }

    private String mName;
    private static Map<String, NaoObjectIdentifier> IDENTIFIER_MAP = new HashMap<String, NaoObjectIdentifier>();

    /**
     * 便宜上存在するルートオブジェクト
     */
    public static final NaoObjectIdentifier TORSO = new NaoObjectIdentifier("torso");
    public static final NaoObjectIdentifier NECK = new NaoObjectIdentifier("neck");
    public static final NaoObjectIdentifier HEAD = new NaoObjectIdentifier("head");
    
    public static final NaoObjectIdentifier LEFT_SHOULDER = new NaoObjectIdentifier("left_shoulder");
    public static final NaoObjectIdentifier LEFT_UPPER_ARM = new NaoObjectIdentifier("left_upperarm");
    public static final NaoObjectIdentifier LEFT_ELBOW = new NaoObjectIdentifier("left_elbow");
    public static final NaoObjectIdentifier LEFT_LOWER_ARM = new NaoObjectIdentifier("left_lowerarm");
    public static final NaoObjectIdentifier LEFT_HIP1 = new NaoObjectIdentifier("left_hip1");
    public static final NaoObjectIdentifier LEFT_HIP2 = new NaoObjectIdentifier("left_hip2");
    public static final NaoObjectIdentifier LEFT_THIGH = new NaoObjectIdentifier("left_thigh");
    public static final NaoObjectIdentifier LEFT_SHANK = new NaoObjectIdentifier("left_shank");
    public static final NaoObjectIdentifier LEFT_ANKLE = new NaoObjectIdentifier("left_ankle");
    public static final NaoObjectIdentifier LEFT_FOOT = new NaoObjectIdentifier("left_foot");

    public static final NaoObjectIdentifier RIGHT_SHOULDER = new NaoObjectIdentifier("right_shoulder");
    public static final NaoObjectIdentifier RIGHT_UPPER_ARM = new NaoObjectIdentifier("right_upperarm");
    public static final NaoObjectIdentifier RIGHT_ELBOW = new NaoObjectIdentifier("right_elbow");
    public static final NaoObjectIdentifier RIGHT_LOWER_ARM = new NaoObjectIdentifier("right_lowerarm");
    public static final NaoObjectIdentifier RIGHT_HIP1 = new NaoObjectIdentifier("right_hip1");
    public static final NaoObjectIdentifier RIGHT_HIP2 = new NaoObjectIdentifier("right_hip2");
    public static final NaoObjectIdentifier RIGHT_THIGH = new NaoObjectIdentifier("right_thigh");
    public static final NaoObjectIdentifier RIGHT_SHANK = new NaoObjectIdentifier("right_shank");
    public static final NaoObjectIdentifier RIGHT_ANKLE = new NaoObjectIdentifier("right_ankle");
    public static final NaoObjectIdentifier RIGHT_FOOT = new NaoObjectIdentifier("right_foot");

    public static Iterator<NaoObjectIdentifier> getIterator(){
        return IDENTIFIER_MAP.values().iterator();
    }
    
    /**
     *
     * @see jp.seraph.jsade.model.ModelObjectIdentifier#toObjectName()
     */
    
    public String toObjectName() {
        return mName;
    }

    /**
     *
     * @see jp.seraph.jsade.model.ModelObjectIdentifier#toString()
     */
    
    public String toString() {
        return mName;
    }
}
